﻿using System.Drawing;
using System.Web.UI.WebControls;

namespace VotanetWebSite.Classes
{
    public sealed class CreateCell
    {
        public static TableCell WithLabel(string id, string text, string cssClass)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeLabel(id, text, cssClass));
            return cell;
        }

        public static TableCell WithImagen(string id, string picturName, string location)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeImagen(id, picturName, location));
            return cell;
        }

        public static TableCell WithRadioList(string id, string group)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeRadioButton(id, group));
            return cell;
        }

        public static TableCell WithTexbox(string id, int large)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeTexBox(id, large));
            return cell;
        }

        public static TableCell WithRequiredFieldValidator(string id, string controlToValidate, string message, string validationGroup)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeRequiredFieldValidator(id, controlToValidate, message,validationGroup));
            return cell;
        }

        public static TableCell WithFilteredTextBoxExtender(string id, string controlToValidate, string validChar)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeFilteredTextBoxExtender(id, controlToValidate, validChar));
            return cell;
        }

        public static TableCell WithValidatorCalloutExtender(string id, string controlToValidate)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeValidatorCalloutExtender(id, controlToValidate));
            return cell;
        }

        public static TableCell WithFileUpload(string id)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeFileUpload(id));
            return cell;
        }

        public static TableCell WithRegularExpressionValidator(string id, string controlToValidate, string expresion, string message, string validationGroup)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeRegularExpressionValidator(id, controlToValidate, expresion, message,validationGroup));
            return cell;
        }

        public static TableCell WithDropDownList(string id)
        {
            TableCell cell = new TableCell();
            cell.Controls.Add(CreateControl.OfTypeDropDownList(id));
            return cell;

        }

    }
}